﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ServiceStack;

namespace EquipmentManager.Dtos
{
    using GTS.Foundation;
    using ServiceStack;
    using ServiceStack.OrmLite;
    public class Equipment : EditableObject
    {
        public string Code { get; set; }
        public string Vendor { get; set; }
        public string Sn { get; set; }
        public string Name { get; set; }
        public string Type { get; set; }
        public string Accuracy { get; set; }
        public double OriginCost { get; set; }
        public DateTime PurchaseDate { get; set; }
        public string UsingDepartment { get; set; }
        public string CheckupOrganization { get; set; }
        public string CheckupResult { get; set; }
        public string UsingStatus { get; set; }
        public int CheckupPeriod { get; set; }
        public DateTime LastCheckupDate { get; set; }
        public string Note { get; set; }
        public string CheckupType { get; set; }
        public string CheckupPerson { get; set; }
        public string CertificateSn { get; set; }
        public string CheckupParameters { get; set; }
        public string RepairRecords { get; set; }
        public string AssetsType { get; set; }
        public double CheckupCharge { get; set; }
        public string Licensor { get; set; }
        public string PersonInCharge { get; set; }
    }

    [Route("/Equipments", Verbs = "GET")]
    [Route("/Equipments/{Id}", Verbs = "GET")]
    public class GetEquipments
    {
        public int Id { get; set; }
        public string Filter { get; set; }

    }
    public class GetEquipmentsResponse : IHasResponseStatus
    {
        public List<Equipment> Entities { get; set; }
        public ResponseStatus ResponseStatus { get; set; }
    }

    [Route("/Equipments", Verbs = "POST")]
    public class PostEquipment
    {
        public Equipment Entity { get; set; }
    }
    public class PostEquipmentResponse : IHasResponseStatus
    {
        public int Id { get; set; }
        public ResponseStatus ResponseStatus { get; set; }
    }

    [Route("/Equipments/{Id}", Verbs = "DELETE")]
    public class DeleteEquipment
    {
        public int Id { get; set; }
    }
    public class DeleteEquipmentResponse : IHasResponseStatus
    {
        public ResponseStatus ResponseStatus { get; set; }
    }
}
